package com.zjj.edu.system.domain;

import com.zjj.edu.common.annotation.Excel;
import com.zjj.edu.common.annotation.Excel.ColumnType;
import com.zjj.edu.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 租户表 sys_tenant
 * 
 * @author zjj
 */
@Data
public class SysTenant extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/** 租户ID */
	@Excel(name = "租户序号", cellType = ColumnType.NUMERIC)
	private Long tenantId;

	/** 租户名称 */
	@Excel(name = "租户名称")
	private String tenantName;

	/** 租户编码 */
	private String tenantCode;

	/** 联系人 */
	@Excel(name = "联系人")
	private String contactName;

	/** 联系电话 */
	@Excel(name = "联系电话")
	private String contactPhone;

	/** 过期状态：0 长期有效  1 指定有效期 */
	private String expireStatus;

	/** 开始时间 */
	private String expireBeginDate;

	/** 结束时间 */
	private String expireEndDate;

	/** 分校上限 */
	private String campusNumLimit;

	/** 用户上限 */
	private String userNumLimit;

	private String expireStatusFormat;

	private String expireDateFormat;

	/** 租户状态（0正常 1停用） */
	@Excel(name = "租户状态", readConverterExp = "0=正常,1=停用")
	private String status;

	/** 删除标志（0代表存在 2代表删除） */
	private String delFlag;

	/** 备注 */
	private String remark;

	public String getRoleKey() {
		return remark;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	@NotBlank(message = "租户名称不能为空")
	@Size(min = 0, max = 30, message = "租户名称长度不能超过30个字符")
	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}


	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	@Size(min = 0, max = 500, message = "备注字符长度不能超过500个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("tenantId", getTenantId())
				.append("tenantName", getTenantName())
				.append("remark", getRemark()).append("status", getStatus()).append("delFlag", getDelFlag())
				.append("createBy", getCreateBy()).append("createTime", getCreateTime())
				.append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime())
				.toString();
	}
}
